name = "add lovelace"
# name后面的句点().)让Python对变量name 执行方法title()指定的操作
# 首字母大写
print(name.title())
# 大写
print(name.upper())
# 小写
print(name.lower())

# 字符串拼接(+)
first_name = 'add'
last_name = 'lovelace'
# 加了一个空格
full_name = first_name + " " + last_name
print(full_name)

print("Hello, " + full_name.title() + "!")

message = "Hello, " + full_name.title() + "!"
print(message)

favorite_language = ' python '
print(favorite_language)

# 删除尾部空格
favorite_language = favorite_language.rstrip()
# 删除头部空格
favorite_language = favorite_language.lstrip()
print(favorite_language)